# Contributor: rubicon <rubicon@mailo.com>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=gleam
pkgver=1.1.0
pkgrel=0
pkgdesc="Statically-typed language that compiles to Erlang and JS"
url="https://gleam.run/"
# s390x, riscv64, ppc64le: ring
# armhf: error: Undefined temporary symbol .LBB88_2
arch="all !armhf !s390x !riscv64 !ppc64le"
license="Apache-2.0"
depends="erlang-dev"
makedepends="cargo cargo-auditable"
source="$pkgname-$pkgver.tar.gz::https://github.com/gleam-lang/gleam/archive/refs/tags/v$pkgver.tar.gz"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -Dvm755 target/release/gleam -t "$pkgdir"/usr/bin/
}

sha512sums="
265867096b758ab554f0b4228d95b40a30d5796499b29775465d8dc3cc3ad37cf517cf979f33d906229dd33e424708e40a13ea6cf9932b54c573cd2335788695  gleam-1.1.0.tar.gz
"
